import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';

export type AccountParams = BasicPageParams & {
  account?: string;
  nickname?: string;
};

export type RoleParams = {
  roleName?: string;
  status?: string;
};

export type RolePageParams = BasicPageParams & RoleParams;

export type DeptParams = {
  deptName?: string;
  status?: string;
};

export type MenuParams = {
  menuName?: string;
  status?: string;
};

export type DictParams = {
  dictName?: string;
  status?: string;
};

export type DictDetailParams = {
  dictName?: string;
  status?: string;
};

export interface AccountListItem {
  id: string;
  account: string;
  email: string;
  nickname: string;
  role: number;
  createTime: string;
  remark: string;
  status: number;
}

export interface DeptListItem {
  id: string;
  orderNo: string;
  createTime: string;
  remark: string;
  status: number;
}

export interface MenuListItem {
  id: string;
  orderNo: string;
  createTime: string;
  status: number;
  icon: string;
  component: string;
  permission: string;
}

export interface RoleListItem {
  id: string;
  roleName: string;
  roleValue: string;
  status: number;
  orderNo: string;
  createTime: string;
}

export interface DictListItem {
  id: string;
  dictName: string;
  dictType: string;
  status: number;
  remark: string;
  createTime: string;
}

export interface DictDetailItem {
  dictId: string; // 字典项ID，对应模拟数据中的 dictId
  dictTag: string; // 字典标签，模拟数据中新增的字段
  dictValue: string; // 字典键值，模拟数据中的 dictValue
  dictSort: number; // 字典排序，模拟数据中新增的字段，类型为数字
  status: string; // 状态，模拟数据中为 'enabled' 或 'disabled'，因此这里应该是字符串类型
  remark: string; // 备注，模拟数据中的 remark
  createTime: string; // 创建时间，模拟数据中的 createTime
}

/**
 * @description: Request list return value
 */
export type AccountListGetResultModel = BasicFetchResult<AccountListItem>;

export type DeptListGetResultModel = BasicFetchResult<DeptListItem>;

export type MenuListGetResultModel = BasicFetchResult<MenuListItem>;

export type RolePageListGetResultModel = BasicFetchResult<RoleListItem>;

export type RoleListGetResultModel = RoleListItem[];

export type DictListGetResultModel = BasicFetchResult<DictListItem>;

export type DictDetailGetResultModel = BasicFetchResult<DictDetailItem>;
